Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add rancher integration for airgapped environment and prime case #694

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

FrankYang0529
Copy link
Member

No description provided.

Signed-off-by: PoAn Yang <poan.yang@suse.com>
Copy link

Name Link
🔨 Latest commit 0d1e92d
😎 Deploy Preview https://67690c38d49f55af7de7a8a2--harvester-preview.netlify.app

@bk201
Copy link
Member

bk201 commented Dec 23, 2024

@FrankYang0529 is there an issue with the change?

## Work with prime Rancher

The prime Rancher uses different registry. If there is no `CATTLE_AGENT_IMAGE` environment variable, the default value uses `docker.io` as default registry whick makes the Harvester can't get correct rancher-agent image. You need to set the `CATTLE_AGENT_IMAGE` environment variable to the correct registry.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our doc doesn't suggest using the docker way to deploy Rancher, does Helm deployment need this?

Copy link
Contributor

@jillian-maroket jillian-maroket left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have reviewed the text. Please note that I will add the Prime-specific content to the SUSE Virtualization section of the Prime doc.

docker save rancher/rancher-agent:<version> -o rancher-agent-<version>.tar

# copy image tar file to the air-gapped environment
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# copy image tar file to the air-gapped environment
# Copy the image TAR file to the air-gapped environment.

scp rancher-agent-<version>.tar rancher@<harvester-node-ip>:/tmp

# ssh to the harvester node and load the image
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# ssh to the harvester node and load the image
# Use SSH to connect to the Harvester node, and then load the image.

Comment on lines +62 to +64

When importing Harvester to an external Rancher, the rancher-agent image is decided by the external Rancher. The image may not be included in the Harvester ISO. In this case, you need to pull the rancher-agent image from the internet and load it on each node or push it to the Harvester cluster's registry.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Integrate with External Rancher
When importing Harvester to an external Rancher, the rancher-agent image is decided by the external Rancher. The image may not be included in the Harvester ISO. In this case, you need to pull the rancher-agent image from the internet and load it on each node or push it to the Harvester cluster's registry.
## Integrate with an External Rancher
Rancher determines the `rancher-agent` image to be used whenever a Harvester cluster is imported. If the image is not included in the Harvester ISO, it must be pulled from the internet and loaded on each node, or pushed to the Harvester cluster's registry.


```bash
# on a computer which can reach the internet and harvester cluster
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# on a computer which can reach the internet and harvester cluster
# Run the following commands on a computer that can access both the internet and the Harvester cluster.

Comment on lines +165 to +172

The prime Rancher uses different registry. If there is no `CATTLE_AGENT_IMAGE` environment variable, the default value uses `docker.io` as default registry whick makes the Harvester can't get correct rancher-agent image. You need to set the `CATTLE_AGENT_IMAGE` environment variable to the correct registry.

Example:
```bash
docker run --privileged -d --name=rancher --restart=unless-stopped -p 8080:80 -p 6443:443 -e CATTLE_AGENT_IMAGE=<registry>/rancher/rancher-agent:v2.8.10 <registry>/rancher/rancher:v2.8.10
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this section. I will add it to the Prime doc. Here is the proposed text for Prime:

Rancher determines the rancher-agent image to be used whenever a Harvester cluster is imported. If the image is not included in the Harvester ISO, it must be pulled from the internet and loaded on each node, or pushed to the Harvester cluster's registry.

Rancher Prime uses a different registry, and you must assign that registry as the value of the CATTLE_AGENT_IMAGE environment variable. If you do not assign a value, Harvester is unable to obtain the correct rancher-agent image because docker.io is used as the default registry.

Example:

docker run --privileged -d --name=rancher --restart=unless-stopped -p 8080:80 -p 6443:443 -e CATTLE_AGENT_IMAGE=<registry>/rancher/rancher-agent:v2.8.10 <registry>/rancher/rancher:v2.8.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants